from enum import nonmember

print("======简易计算器=====")
num1 = float(input("请输入第一个数字:"))
operate =input("请输入运算符:+-*/")
num2 = float(input("请输入第二个数字:"))
result= None
if operate == "+":
    print(num1 + num2)
elif operate == "-":
    print(num1 - num2)
elif operate == "*":
    print(num1 * num2)
elif operate == "/":
  if num2!=0:
    print(num1 / num2)
  else:
    print("除数不能为零")
else:
     print("无效运算符")
if result != None:
    print(f"{num1}{operate}{num2} = {result:.2f}")



print("\n=====BMI指数运算器")
height = float(input("输入身高(单位:米):"))
weight = float(input("输入体重(单位:千克):"))
bmi = weight / (height * height)
status=""
if bmi <=18.5:
    status = "偏瘦"
elif bmi >= 18.5 and bmi <24:
    status = "正常"
elif 24 <=bmi < 28:
    status = "超重"
else:
    status = "肥胖"
print(f"bmi指数为:{bmi:.1f'}{status}")
print("【参考标准】")
print("偏瘦: BMI<18.5 | 正常: 18.5≤BMI<24 | 超重: 24≤BMI<28 | 肥胖: BMI≥28")